<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>伪造ajax</title>
</head>
<script type="text/javascript">
    window.onload = function (){
        alert("欢迎来到杰出平台");
        console.log(document.getElementById('as'));
        loadPage();
    }

    function loadPage(){
        var tUrl = document.getElementById('url').value;
        console.log(tUrl);
        document.getElementById('whj').src = tUrl;
    }
</script>
<body>
    <div>
        <input type="text" id="url" value="https://www.baidu.com/" />
        <input type="submit" id="sm" value="提交" onclick="loadPage()">
    </div>
    <div>
        <iframe width="100%" height="500px" id="whj" src="" >

        </iframe>
    </div>


</body>
</html>